package com.qiao.glod.ui.fragment;

import android.os.Bundle;

import com.qiao.glod.adapter.FragmentItemPagerAdapter;
import com.qiao.glod.api.Constants.DataType;

/**
 * Created by Qiao on 2016/4/7.
 * function：
 */
public class MainFragment extends TabFragment {

    @Override
    protected FragmentItemPagerAdapter getFragmentAdapter() {
        return FragmentItemPagerAdapter.Builder.create(getActivity())
                .add("全部", ContentFragment.class, getArguments(DataType.All))
                .add("Android", ContentFragment.class, getArguments(DataType.Android))
                .add("IOS", ContentFragment.class, getArguments(DataType.IOS))
                .add("前端", ContentFragment.class, getArguments(DataType.Js))
                .build(getChildFragmentManager());
    }

    public Bundle getArguments(String type){
        Bundle bundle = new Bundle();
        bundle.putString("type",type);
        return bundle;
    }
}
